function toggleMagic()
{
if(document.getElementById('magicEditor').style.display=="none")
{
document.getElementById('magicEditor').style.display="block"
}
else
{
document.getElementById('magicEditor').style.display="none"
}
}

function insertMagic(mit)
{
document.getElementById("postingComposeBox").contentWindow.document.execCommand("insertHTML",false,mit)
}

function FBlike()
{
temp = '<iframe src="//www.facebook.com/plugins/like.php?href='
temp += encodeURI(prompt("Melyik oldalra mutasson a Like gomb?"))
  temp += '&amp;width&amp;layout=standard&amp;action=like&amp;show_faces=true&amp;share=false&amp;height=80&amp;appId=461574050611845" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:80px;width:100%;" allowTransparency="true"></iframe>'
insertMagic("<br>" + temp + "<br>")
}

function TWfollow()
{
user=prompt("Twitter felhasználónév")
temp='<a href="https://twitter.com/' + user + '" class="twitter-follow-button" data-show-count="false" data-show-screen-name="false">Follow @' + user + "</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)) js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>";
insertMagic("<br>" + temp + "<br>")
}

function vonal()
{
insertMagic("<hr>")
}

var div = document.createElement('div');
div.id="magicouter";
div.innerHTML="<div class='GCUXF0KCM3B' onclick='toggleMagic()'><div class='GCUXF0KCJ3B'><div class='GCUXF0KCO3B'><span class='GCUXF0KCL3B GCUXF0KCEXB'></span>MagicEditor</div></div></div><div id='magicEditor' style='display:none' class='GCUXF0KCO3B'><a href=\'javascript:vonal()\'>Vízszintes vonal beszúrása</a><br><a href=\'javascript:FBlike()\'>FB like gomb beszúrása</a><br></div>";
document.getElementsByClassName("optionHolder")[0].insertBefore(div,document.getElementsByClassName("optionHolder")[0].childNodes[0]);
//document.getElementsByClassName("optionHolder")[0].innerHTML="<div class='GCUXF0KCM3B' onclick='toggleMagic()'><div class='GCUXF0KCJ3B'><div class='GCUXF0KCO3B'><span class='GCUXF0KCL3B GCUXF0KCEXB'></span>MagicEditor</div></div></div><div id='magicEditor' style='display:none' class='GCUXF0KCO3B'><a href=\'javascript:FBlike()\'>FB like gomb beszúrása</a><br></div>" + document.getElementsByClassName("optionHolder")[0].innerHTML